<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BScreenJoinService
 *
 * @author jianfeng
 */
class BScreenService extends BUIScreen {

    //put your code here

    public function render($data = null, $style = NULL) {
        
        if($data == NULL)
            $data = array();
        
        $data['screen'] = $this;

        $listLayout = new BUIViewLayout();
        $listLayout->addViewItem('service', $data);
        $this->renderLayout($listLayout);
    }

    public function getServiceApps() {

        $service = Blyn::app()->getActiveService();

        $apps = $service->getServiceApps();
        
        return $apps;
        
        /*

        $data = array();

        foreach ($apps as $app) {
            $name = $app->getName();
            if ($name == 'ServiceEngine')
                $name = 'Home';
            $data[$app->getId()] = $name;
        }

        return $data;
         * 
         */
    }

}

?>
